File Operations
| Command |
Shortcut (Windows/Linux) |
Shortcut (Mac) |
| New File |
Ctrl + N |
Cmd + N |
| Open File |
Ctrl + O |
Cmd + O |
| Save File |
Ctrl + S |
Cmd + S |
| Save All |
Ctrl + K S |
Cmd + Option + S |
| Close File |
Ctrl + W |
Cmd + W |
| Close Window |
Ctrl + Shift + W |
Cmd + Shift + W |
Multi-Cursor & Selection
| Command |
Shortcut (Windows/Linux) |
Shortcut (Mac) |
| Add Cursor Above |
Ctrl + Alt + Up |
Cmd + Option + Up |
| Add Cursor Below |
Ctrl + Alt + Down |
Cmd + Option + Down |
| Select Next Match |
Ctrl + D |
Cmd + D |
| Select All Matches |
Ctrl + Shift + L |
Cmd + Shift + L |
| Column Selection |
Shift + Alt + Drag |
Shift + Option + Drag |
Navigation
| Command |
Shortcut (Windows/Linux) |
Shortcut (Mac) |
| Go to File |
Ctrl + P |
Cmd + P |
| Go to Line |
Ctrl + G |
Cmd + G |
| Go to Symbol |
Ctrl + Shift + O |
Cmd + Shift + O |
| Quick Open |
Ctrl + P |
Cmd + P |
| Switch Tab |
Ctrl + Tab |
Cmd + Tab |
| Previous Tab |
Ctrl + Shift + Tab |
Cmd + Shift + Tab |
Search & Replace
| Command |
Shortcut (Windows/Linux) |
Shortcut (Mac) |
| Find |
Ctrl + F |
Cmd + F |
| Replace |
Ctrl + H |
Cmd + Option + F |
| Find in Files |
Ctrl + Shift + F |
Cmd + Shift + F |
| Replace in Files |
Ctrl + Shift + H |
Cmd + Shift + H |
Code Editing
| Command |
Windows/Linux |
Mac |
| Comment Line |
Ctrl + / |
Cmd + / |
| Block Comment |
Shift + Alt + A |
Shift + Option + A |
| Undo |
Ctrl + Z |
Cmd + Z |
| Redo |
Ctrl + Y |
Cmd + Shift + Z |
| Format Document |
Shift + Alt + F |
Shift + Option + F |
Refactoring
| Command |
Windows/Linux |
Mac |
| Fold Region |
Ctrl + Shift + [ |
Cmd + Option + [ |
| Unfold Region |
Ctrl + Shift + ] |
Cmd + Option + ] |
| Fold All |
Ctrl + K Ctrl + 0 |
Cmd + K Cmd + 0 |
| Unfold All |
Ctrl + K Ctrl + J |
Cmd + K Cmd + J |
Terminal
| Command |
Windows/Linux |
Mac |
| Open Terminal |
Ctrl + ` |
Ctrl + ` |
| New Terminal |
Ctrl + Shift + ` |
Cmd + Shift + ` |
| Kill Terminal |
Trash Icon |
Trash Icon |
| Split Terminal |
Ctrl + Shift + 5 |
Cmd + Shift + 5 |
Debugging
| Command |
Windows/Linux |
Mac |
| Start Debugging |
F5 |
F5 |
| Stop Debugging |
Shift + F5 |
Shift + F5 |
| Restart Debugging |
Ctrl + Shift + F5 |
Cmd + Shift + F5 |
| Step Over |
F10 |
F10 |
| Step Into |
F11 |
F11 |
| Step Out |
Shift + F11 |
Shift + F11 |
| Toggle Breakpoint |
F9 |
F9 |
Explorer
| Command |
Shortcut |
| Explorer |
Ctrl + Shift + E |
| Search |
Ctrl + Shift + F |
| Command |
Shortcut |
| Open Source Control |
Ctrl + Shift + G |
| Stage Changes |
+ Button |
| Commit |
Ctrl + Enter |
| Push |
Git Menu |
| Pull |
Git Menu |
| Sync Changes |
Sync Button |
Useful Command Palette Commands
Open Command Palette:
Ctrl + Shift + P
Popular Commands:
> Format Document
> Git Clone
> Reload Window
> Open Settings (JSON)
> Change Color Theme
> Developer: Toggle Developer Tools
> Preferences: Open Keyboard Shortcuts
Emmet Shortcuts
Emmet is a powerful tool for writing HTML and CSS faster. Here are some common Emmet abbreviations:
html
div.container
ul>li*5
nav>ul>li*4>a
header+main+footer
section.hero>h1+p+button
VS Code Settings Shortcuts
Open Settings UI:
Ctrl + ,
Open JSON Settings:
Ctrl + Shift + P
> Preferences: Open Settings (JSON)
Most Used Shortcuts for Developers
Ctrl + P Quick Open File
Ctrl + / Comment Line
Alt + Shift + F Format Document
Ctrl + D Select Next Match
Ctrl + F Find
Ctrl + H Replace
F2 Rename Variable
Ctrl + Space IntelliSense
Ctrl + ` Open Terminal
F5 Run Debugger
Ctrl + Shift + P Command Palette